Skip to content

audit: classify 15 FFI unsafe findings as legitimate (PA001/PA007)#20

Merged
hyperpolymath merged 2 commits into
mainfrom
panic-fix/PA001-PA007-ffi-legitimate
May 27, 2026
Merged

audit: classify 15 FFI unsafe findings as legitimate (PA001/PA007)#20
hyperpolymath merged 2 commits into
mainfrom
panic-fix/PA001-PA007-ffi-legitimate

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

panic-attack assail reports 15 UnsafeCode (PA001) + UnsafeFFI (PA007) Critical/High findings under ffi/zig/src/ — all at the Zig→C ABI boundary (dragonfly + cache bindings).

What changes

  • audits/assail-classifications.a2ml (15 entries, classification=legitimate-ffi)
  • audits/audit-ffi-2026-05-26.md

Same pattern as svalinn#11, proven#67, gossamer#54.

Refs hyperpolymath/panic-attack#32.

🤖 Generated with Claude Code

panic-attack assail flags 15 UnsafeCode/UnsafeFFI Critical/High findings
under ffi/zig/src/ (dragonfly + cache bindings) — all at the Zig→C ABI
boundary.

Adds:
- audits/assail-classifications.a2ml (15 entries, classification=legitimate-ffi)
- audits/audit-ffi-2026-05-26.md

Refs hyperpolymath/panic-attack#32.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 47 issues detected

Severity Count
🔴 Critical 0
🟠 High 31
🟡 Medium 16
View findings
[
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (1 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/reextract.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (18 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/cache.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @alignCast performs unchecked alignment cast (5 occurrences, CWE-704)",
    "type": "zig_align_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/cache.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (11 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/docudactyl_ffi.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @alignCast performs unchecked alignment cast (4 occurrences, CWE-704)",
    "type": "zig_align_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/docudactyl_ffi.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (5 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/lith_adapter.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @bitCast reinterprets bits without type checking (6 occurrences, CWE-704)",
    "type": "zig_bit_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/lith_adapter.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "medium"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (15 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/gpu_ocr.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @alignCast performs unchecked alignment cast (7 occurrences, CWE-704)",
    "type": "zig_align_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/gpu_ocr.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

- Replace codeql.yml `javascript-typescript` matrix entry with
  `actions` (repo has no JS/TS source). Matches the canonical fix
  in rsr-template-repo#71 / mtpc#8 / thunderbird#75.
- Replace examples/SafeDOMExample.res with the canonical
  examples/SafeDOMExample.affine (per gitbot-fleet#208 and the
  banned-ReScript anti-pattern policy).
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 47 issues detected

Severity Count
🔴 Critical 0
🟠 High 31
🟡 Medium 16
View findings
[
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (1 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/reextract.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (18 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/cache.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @alignCast performs unchecked alignment cast (5 occurrences, CWE-704)",
    "type": "zig_align_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/cache.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (11 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/docudactyl_ffi.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @alignCast performs unchecked alignment cast (4 occurrences, CWE-704)",
    "type": "zig_align_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/docudactyl_ffi.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (5 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/lith_adapter.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @bitCast reinterprets bits without type checking (6 occurrences, CWE-704)",
    "type": "zig_bit_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/lith_adapter.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "medium"
  },
  {
    "reason": "Zig @ptrCast performs unchecked pointer type conversion (15 occurrences, CWE-704)",
    "type": "zig_ptr_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/gpu_ocr.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Zig @alignCast performs unchecked alignment cast (7 occurrences, CWE-704)",
    "type": "zig_align_cast",
    "file": "/home/runner/work/docudactyl/docudactyl/ffi/zig/src/gpu_ocr.zig",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath
hyperpolymath merged commit 51368de into main May 27, 2026
20 of 21 checks passed
@hyperpolymath
hyperpolymath deleted the panic-fix/PA001-PA007-ffi-legitimate branch May 27, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant